package com.google.code.solrdimension.indexmodifiers;

import org.apache.solr.common.SolrInputDocument;

import com.google.code.solrdimension.config.dimensionvalue.AbstractDimensionValueConfig;

/**
 * The index modifier action. IndexModActions implementing this interface should
 * register the {@link AbstractDimensionValueConfig} to IndexModAction mapping
 * in the SolrDimensionConfig spring bean declaration
 * 
 * 
 * 
 * @author mhc
 * 
 */
public interface IndexModAction {

    /**
     * * Note that there isn't any exception handling in this interface.
     * 
     * It is assumed that the CORRECT instance of subtypes of
     * {@link AbstractDimensionValueConfig} will be passed to the IndexModAction
     * and {@link SolrInputDocument} is never null
     * 
     * @return
     *      True if the solrInputDoc has been modified correctly, false otherwise
     **/
    public boolean execute(AbstractDimensionValueConfig dimensionValueconfig, SolrInputDocument solrInputDoc, Object objecToIndex);

}
